package org.dfzt.modules.quartz.service;

import java.util.List;

import com.dangdang.ddframe.job.api.simple.SimpleJob;
import com.dangdang.ddframe.job.lite.config.LiteJobConfiguration;
import com.dangdang.ddframe.job.lite.lifecycle.api.JobOperateAPI;
import com.dangdang.ddframe.job.lite.spring.api.SpringJobScheduler;
import org.dfzt.modules.quartz.entity.QuartzJob;
import org.dfzt.modules.quartz.util.JobListener;
import org.dfzt.modules.quartz.util.JobUtil;
import org.quartz.SchedulerException;

import com.baomidou.mybatisplus.extension.service.IService;

/**
 * @Description: 定时任务在线管理
 * @Author: jeecg-boot
 * @Date: 2019-04-28
 * @Version: V1.1
 */
public interface IQuartzJobService extends IService<QuartzJob> {

    List<QuartzJob> findByJobName(String jobName);

	List<QuartzJob> findByJobClassName(String jobClassName);

	boolean saveAndScheduleJob(QuartzJob quartzJob) throws Exception;

	boolean editAndScheduleJob(QuartzJob quartzJob, String jobName) throws Exception;

	boolean deleteAndStopJob(QuartzJob quartzJob);

	boolean resumeJob(QuartzJob quartzJob) throws Exception;

	void startJob();

	void startJob(QuartzJob job) throws Exception;

	void schedulerAdd(String jobName, String jobClassName, String cronExpression, String parameter) throws Exception;

}
